home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / vesa24_2.zip / VHEADER.H < prev    next >
C/C++ Source or Header  |  1993-04-09  |  2KB  |  89 lines

  1. /* vheader.h -------------- VESA HEADER info --------------- January 1993 */
  2. /* Written by Don Lewis. <djlewis@ualr.edu> <djlewis@spider.ualr.edu>     */
  3. /* structure of SVGA information to tie to 'C' functions. I threw in      */
  4. /* the PCX and TARGA header info to make it easy to read and display      */
  5. /* those types of pictures. I have already written PCX code for Hi-color  */
  6. /* picture display.                              */
  7.  
  8. #ifndef _vheader_h_
  9. #define _vheader_h_
  10.  
  11. #define _Cdecl  cdecl
  12.  
  13. /* VESA video card Information block  */
  14. struct  VgaInfoBlock {
  15.     char VESASignature[4];
  16.     int  VESAVersion;
  17.     unsigned long *OEMStringPtr;
  18.     long Capabilities;
  19.     unsigned int  *VideoModePtr;
  20.     int  TotalMemory;
  21.     char Reserved[236];
  22.     } ;
  23. /* VESA video card capabilities block  */
  24. struct  ModeInfoBlock {
  25.     int  ModeAttributes;
  26.     char WinAAttributes;
  27.     char WinBAttributes;
  28.     int  WinGranularity;
  29.     int  WinSize;
  30.     unsigned int  WinASegment;
  31.     unsigned int  WinBSegment;
  32.     unsigned long *WinFuncPtr;
  33.     int  BytesPerScanLine;
  34.     int  XResolution;
  35.     int  YResolution;
  36.     char XCharSize;
  37.     char YCharSize;
  38.     char NumberOfPlanes;
  39.     char BitsPerPixel;
  40.     char NumberOfBanks;
  41.     char MemoryModel;
  42.     char BankSize;
  43.     char NumberOfImagePages;
  44.     char SizeOfBank;
  45.     char RedMaskSize;
  46.     char RedFieldPosition;
  47.     char GreenMaskSize;
  48.     char GreenFieldPosition;
  49.     char BlueMaskSize;
  50.     char BlueFieldPosition;
  51.     char RsvdMaskSize;
  52.     char RsvdFieldPosition;
  53.     char DirectColorModeInfo;
  54.     char Reserved[216];
  55.     } ;
  56. /* TARGA picture file header structure  */
  57. struct TargaHdStruct {
  58.     char textSize;
  59.     char mapType;
  60.     char dataType;
  61.     int  mapOrig;
  62.     int  mapLength;
  63.     char CMapBits;
  64.     int  XOffset;
  65.     int  YOffset;
  66.     int  x;
  67.     int  y;
  68.     char dataBits;
  69.     char imType;
  70.     };
  71. /* PCX picture file header structure  */
  72. struct PCXHEAD {
  73.     char manufacturer;
  74.     char version;
  75.     char encoding;
  76.     char bits_per_pixel;
  77.     int  xmin, ymin;
  78.     int  xmax, ymax;
  79.     int  hres, vres;
  80.     char palette[48];
  81.     char reserved;
  82.     char colour_planes;
  83.     int  bytes_per_line;
  84.     int  filler[58];
  85.     };
  86.  
  87. #endif
  88.  
  89.